package org.huzhp.console.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

/**
 * @Description: java类作用描述
 * @Author: huzp
 * @CreateDate: 2020/3/12 18:17
 * @Version: 1.0
 */
@Controller
public class ConsoleController {


    @Autowired
    private RestTemplate restTemplate;


    @GetMapping("service")
    @ResponseBody
    public String services() throws JsonProcessingException {
//        String apps = restTemplate.getForObject(eurekaServer+EUREKA_API,String.class);


//        List<GatewayRouteVo> routeVos = RouteUtil.parse(apps);
//        routeVos.forEach(routeVo -> consoleService.saveRoute(routeVo));
        return "OK";
    }


}
